package com.eds.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.eds.dto.BackBoardDTO;
import com.eds.pojo.BaseResult;
import com.pojo.User;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * @author vvSmile
 * @description 针对表【user】的数据库操作Service
 * @createDate 2025-03-14 16:50:45
 */
@Service
public interface UserService extends IService<User> {

    //1.登录
    BaseResult loginByUsernamePassword(User user);

    //2.注册
    Long registerService(User user);

    //3. 获取登录的用户名
    User getUserLoginUsernameService(String token);

    //5. 发送注册验证码
    boolean sendRegisterMessageCodeService(String mobile);
    //6. 验证注册验证码
    Boolean checkRegisterMessageCodeService(String mobile,String userCode);
    //5. 发送登录验证码
    boolean sendLoginMessageCodeService(String mobile);

    //6. 验证登录验证码
    BaseResult checkLoginMessageCodeService(String mobile, String userCode);

    //7.重置密码
    Boolean resetPasswordService(User user);

    //8. 发送重置验证码
    boolean sendResetMessageCodeService(String mobile);

    //9. 验证重置验证码
    Boolean checkResetMessageCodeService(String mobile, String userCode);

    //10.测试
    BaseResult test();

    //11.获取用户详细信息
    User getUserDetailsInfoService(String token);

    //12.修改用户信息
    Boolean updateUserInfo(String token, User user);

    //12.修改用户手机号
    Boolean updateUserPhone(String token, User user);

    BaseResult upload(String token, MultipartFile file);

    Long getUserIdFromToken(String token);

    User getUserInfoByUserId(Long courseId);


    User getUserByUserId(Long userId);

    //13.验证token
    Boolean verifyToken(String token, Long userId);

    //14.获取所有老师课程
    List<User> getAllTeachersCourses();

    //15.获取所有用户
    List<User> getAllUser();

    //16.获取用户头像
    String getUserAvatarByName(String userName);

    //17.获取所有用户
    BaseResult getAllUsers(String userName);

    //18.修改用户权限
    BaseResult updateUserRole(User user);

    //19.删除用户
    BaseResult deleteUser(User user);

    //20.获取用户面板数据
    BackBoardDTO getUserBoard();

    //21.获取今日用户数
    List<User> getTodayUserCount();
}
